package Dao;


import java.util.Calendar;
import java.util.GregorianCalendar;

import metier.Adherent;
import metier.Employe;
import metier.EnumCategorieEmploye;
import metier.Exemplaire;
import exception.BiblioException;

public class EmployesDao {
	private static Employe[] EmployeDB= {
		new Employe("Leton","Thierry", new GregorianCalendar(1983, Calendar.JUNE, 27).getTime(),"Masculin",1,"oscarou","Oscaro","1234",EnumCategorieEmploye.Bibliothecaire),
		new Employe("Wild","Oscar", new GregorianCalendar(1983, Calendar.JUNE, 27).getTime(),"Masculin",2,"oscarou","Oscaro","1234",EnumCategorieEmploye.Bibliothecaire),
		new Employe("Wild","Oscar", new GregorianCalendar(1983, Calendar.JUNE, 27).getTime(),"Masculin",3,"oscarou","Oscaro","1234",EnumCategorieEmploye.Bibliothecaire),
		new Employe("Wild","Oscar", new GregorianCalendar(1983, Calendar.JUNE, 27).getTime(),"Masculin",4,"oscarou","Oscaro","1234",EnumCategorieEmploye.Bibliothecaire),
		new Employe("Wild","Oscar", new GregorianCalendar(1983, Calendar.JUNE, 27).getTime(),"Masculin",5,"oscarou","Oscaro","1234",EnumCategorieEmploye.Bibliothecaire),
		new Employe("Wild","Oscar", new GregorianCalendar(1983, Calendar.JUNE, 27).getTime(),"Masculin",6,"oscarou","Oscaro","1234",EnumCategorieEmploye.Bibliothecaire),
		new Employe("Wild","Oscar", new GregorianCalendar(1983, Calendar.JUNE, 27).getTime(),"Masculin",7,"oscarou","Oscaro","1234",EnumCategorieEmploye.Bibliothecaire),
		new Employe("Wild","Oscar", new GregorianCalendar(1983, Calendar.JUNE, 27).getTime(),"Masculin",8,"oscarou","Oscaro","1234",EnumCategorieEmploye.Bibliothecaire),
		new Employe("Wild","Oscar", new GregorianCalendar(1983, Calendar.JUNE, 27).getTime(),"Masculin",9,"oscarou","Oscaro","1234",EnumCategorieEmploye.Bibliothecaire),
		new Employe("Wild","Oscar", new GregorianCalendar(1983, Calendar.JUNE, 27).getTime(),"Masculin",10,"oscarou","Oscaro","1234",EnumCategorieEmploye.Bibliothecaire),
		new Employe("Wild","Oscar", new GregorianCalendar(1983, Calendar.JUNE, 27).getTime(),"Masculin",20,"oscarou","Oscaro","1234",EnumCategorieEmploye.Bibliothecaire),
		new Employe("Wild","Oscar", new GregorianCalendar(1983, Calendar.JUNE, 27).getTime(),"Masculin",20,"oscarou","Oscaro","1234",EnumCategorieEmploye.Bibliothecaire),
	};
	
	
	
	public static Employe findByKey (int id){
		for (Employe a  : EmployeDB){
			if (id == a.getIdEmploye()) return a;	
			}
		try {
			throw new BiblioException("utilisateur inconnu");
		} 
		catch (BiblioException e) {
			e.printStackTrace();
		}
		return null;
	}
}
